package com.example.lirisheng.springbootfinalexperiment.repositories;


import com.example.lirisheng.springbootfinalexperiment.entity.Authorities;
import com.example.lirisheng.springbootfinalexperiment.entity1.ResAuthoritiesEntity;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

public interface AuthoritiesRepository extends CrudRepository<Authorities,Integer> {

    public Authorities findByName(String name);

//    @Modifying
//    @Query(value = "insert into authorities(username, authority) values ( :username,:authority)",nativeQuery = true)
//    public void mysave(@Param("username")String username,@Param("authority")String authourity);

//    public Authorities findByUsernameAndAuthority(String username,String authority);


}
